package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ImcPeoplePurivewId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ImcPeoplePurivewId implements java.io.Serializable {

	// Fields

	private Integer uid;
	private Integer organId;
	private Integer purivewType;

	// Constructors

	/** default constructor */
	public ImcPeoplePurivewId() {
	}

	/** full constructor */
	public ImcPeoplePurivewId(Integer uid, Integer organId, Integer purivewType) {
		this.uid = uid;
		this.organId = organId;
		this.purivewType = purivewType;
	}

	// Property accessors

	@Column(name = "UID")
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "ORGAN_ID")
	public Integer getOrganId() {
		return this.organId;
	}

	public void setOrganId(Integer organId) {
		this.organId = organId;
	}

	@Column(name = "purivew_type")
	public Integer getPurivewType() {
		return this.purivewType;
	}

	public void setPurivewType(Integer purivewType) {
		this.purivewType = purivewType;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ImcPeoplePurivewId))
			return false;
		ImcPeoplePurivewId castOther = (ImcPeoplePurivewId) other;

		return ((this.getUid() == castOther.getUid()) || (this.getUid() != null
				&& castOther.getUid() != null && this.getUid().equals(
				castOther.getUid())))
				&& ((this.getOrganId() == castOther.getOrganId()) || (this
						.getOrganId() != null && castOther.getOrganId() != null && this
						.getOrganId().equals(castOther.getOrganId())))
				&& ((this.getPurivewType() == castOther.getPurivewType()) || (this
						.getPurivewType() != null
						&& castOther.getPurivewType() != null && this
						.getPurivewType().equals(castOther.getPurivewType())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getOrganId() == null ? 0 : this.getOrganId().hashCode());
		result = 37
				* result
				+ (getPurivewType() == null ? 0 : this.getPurivewType()
						.hashCode());
		return result;
	}

}